package com.maserb.monitor.service.remote;

import com.maserb.monitor.common.PageRequestParam;
import com.maserb.monitor.entity.JwOrgEntity;
import com.maserb.monitor.entity.UserEntity;
import com.maserb.monitor.entity.card.EcCardEntity;
import com.maserb.monitor.entity.card.RechargeRecordEntity;
import com.maserb.monitor.entity.schoolStudent.SchoolStudentEntity;
import com.maserb.monitor.model.TransactionModel;
import com.maserb.monitor.repository.schoolStudent.RechargeRecordRepository;
import com.maserb.monitor.service.base.JpaSpecificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface EcCardService extends JpaSpecificationService<RechargeRecordRepository, RechargeRecordRepository, RechargeRecordEntity, String> {
    Long doAddOrg(JwOrgEntity org);

    void doUpdateOrg(JwOrgEntity org);

    void doDeleteOrg(JwOrgEntity org);

    Long doAddPerson(SchoolStudentEntity student);

    Long doAddTeacher(UserEntity teacher);

    void doUpdatePerson(SchoolStudentEntity student);

    void doUpdateTeacher(UserEntity userEntity);

    void doDeletePerson(SchoolStudentEntity student);

    void doAddRechargeRecord(RechargeRecordEntity rechargeRecord);

    List<TransactionModel> queryTransaction(PageRequestParam page, String personId, String type);

    String queryBalance(String cid);

    Page<RechargeRecordEntity> findAllRechargeRecord(Pageable pageable, String personId, String type);

    void saveCard(EcCardEntity card);
}
